//
//  ImageIdentifierResultFooterView.m
//  ZITHER
//
//  Created by imac on 2018/5/30.
//  Copyright © 2018年 MinesTime. All rights reserved.
//

#import "ImageIdentifierResultFooterView.h"
@interface ImageIdentifierResultFooterView ()
@property (weak, nonatomic) IBOutlet UIButton *feedbackButton;

@end
@implementation ImageIdentifierResultFooterView
+ (ImageIdentifierResultFooterView *)instanceWithFrame:(CGRect)frame {
    ImageIdentifierResultFooterView *view = (ImageIdentifierResultFooterView *)[[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil] firstObject];
    view.frame = frame;
    return view;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    [self.feedbackButton setCornerRadiusWithRadius:2 isMasks:YES];
    [self.feedbackButton setGradientBackgroundWithColors:@[[UIColor colorWithHex:@"#484F69"], [UIColor colorWithHex:@"#2E3144"]] locations:nil startPoint:CGPointMake(0, 0) endPoint:CGPointMake(0, 1)];
}
- (IBAction)feedbackClick:(UIButton *)sender {
    FeedbackButtonClickType type = ButtonClickTypeTryAgain;
    switch (sender.tag) {
        case 1: {
            type = ButtonClickTypeFeedback;
        } break;
        case 2: {
            type = ButtonClickTypeTryAgain;
        } break;
        default:
            break;
    }
    if (self.buttonClickTypeBlock) {
        self.buttonClickTypeBlock(type);
    }
}



@end
